import { BasicColumn } from '/@/components/Table';
import { FormSchema } from '/@/components/Table';

export const columns: BasicColumn[] = [
  {
    title: 'ID',
    dataIndex: 'id',
  },
  {
    title: '标题',
    dataIndex: 'title',
  },
  {
    title: '类型',
    dataIndex: 'typeName',
  },
  {
    title: '开始时间',
    dataIndex: 'beginDate',
  },
  {
    title: '发起人',
    dataIndex: 'starter',
  },
  {
    title: '状态',
    dataIndex: 'status',
  },
];

export const searchFormSchema: FormSchema[] = [
  {
    field: 'by',
    label: '按',
    component: 'Select',
    required: true,
    colProps: { span: 4 },
    defaultValue: 'title',
    componentProps: {
      options: [
        { value: 'title', label: '标题' },
        { value: 'user', label: '发起人' },
        { value: 'ID', label: '流程号' },
      ],
    },
  },
  {
    field: 'what',
    label: '',
    component: 'Input',
    colProps: { span: 4 },
  },
  {
    field: 'status',
    label: '流程状态',
    component: 'Select',
    colProps: { span: 6 },
    componentProps: {
      options: [
        { value: '', label: '不限(不含未生效及已删除)' },
        { value: '0', label: '未开始' },
        { value: '1', label: '处理中' },
        { value: '2', label: '已结束' },
        { value: '-1', label: '已放弃' },
        { value: '-2', label: '已拒绝' },
        { value: '-10', label: '未生效' },
        { value: '-11', label: '已删除' },
      ],
    },
  },
  {
    field: 'dates',
    label: '日期',
    component: 'RangePicker',
    colProps: { span: 8 },
  },
];

export const formSchema: FormSchema[] = [];
